1. Field of the Invention
The present invention relates to improvements in a digital data processing system, and more specifically to a hardware arrangement of producing a signal which requires an interruption of execution of program instructions upon detecting an unexpected control transfer which a programmer does not expect. The present invention is well suited for debugging a program.
2. Description of the Prior Art
It is not seldom in a digital data processing system that an operation flow is strayed or directed to an unexpected program flow due to programming errors or electric noises induced at computer elements such as a microprocessor, etc. If such an undesirable situation happens, it is necessary to detect same and terminate runaway of the program as quickly as possible.
According to a programmer's reference manual of the Intel 80386 microprocessor (for example), each of program segments is provided with a segment limit specifying the size of the segment. If control is transferred to an address outside the segment limit, the execution of a program is discontinued or interrupted by the processor. Further, in a so-called paging mode, each page is provided with an attribute which indicates whether or not control can be transferred to the page. If control is transferred to such a page that is prohibited to be accessed, the processor interrupts the execution of the program. Still further, it an instruction which has not been defined is to be executed or, if an instruction which includes inexecutable operand, then a processor interrupts the execution of the program.
Throughout the instant disclosure, each of the aforesaid interrupts is called an "internal interrupt" in that a processor detects the above mentioned events therewithin and then interrupts the execution of a program.
Let us consider the case where a branch instruction is executed but control is erroneously transferred to an instruction which is not expected by a programmer. Even in such a case, however, the program may be executed from the entry point (viz., target address) without causing any interruption by the processor. This is because the processor fails to detect one of the above mentioned interrupt conditions. Thus, the program is executed until the processor eventually detects one of the above mentioned conditions and then interrupts the program run.
It is therefore highly desirable to request an internal interrupt to the processor immediately after a branch instruction causes transition of control to an entry point which a programmer does not expect. That is, in such a case, it is very important to terminate the execution of a program as quickly as possible in that it becomes difficult to correctly specify the cause once the program enters into a condition of runaway.